#ifndef LOGGER_H
#define LOGGER_H

#include <iostream>
#include <string>
using namespace std;

namespace tinystl{
    class Logger{
        public:
            static Logger *instance() noexcept
            {
                if (!m_pInstance)
                {
                    static Logger instance;
                    m_pInstance = &instance;
                }
                return m_pInstance;
            }
    
            const void log(string msg) noexcept
            {
                cout << msg << endl;
            }

            const void log(char ch) noexcept
            {
                cout << ch;
            }

        private:
            Logger(){}
            ~Logger(){}

            static Logger *m_pInstance;
    };

    Logger *Logger::m_pInstance = NULL;

};
#endif
